﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JieBooLaw.WebSite
{
    using JieBooLaw.Service;
    using JieBooLaw.Domain;
    using JieBooLaw.Common.Web.Util;
    public partial class News : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                BindGrid();
            }

        }
        public void BindGrid()
        {
            TInfoRelease_InfoSvc svc = new TInfoRelease_InfoSvc();
            TInfoRelease_Info entity = new TInfoRelease_Info();
            int ItemID = Convert.ToInt32(Request.QueryString["id"]);
            IList<TInfoRelease_Info> entityList = (from LsInfo in svc.GetAllList() where LsInfo.ItemID.Equals(ItemID) select LsInfo).ToList<TInfoRelease_Info>();
            this.reGsNew.DataSource = this.AspNetPager1.AutoPagedDataSource(entityList);
            this.reGsNew.DataBind();  
        }
        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            BindGrid();
        }
    } 
}
